<template>
  <div style="background-color: white; min-height: 100vh; display: flex; flex-direction: column; justify-content: center;">
    <div style="margin: 0 auto; width: 80%;">  <!-- 控制步骤条宽度 -->
      <el-steps :active="3" align-center>
        <el-step title="步骤1" description="填写公司认证信息"></el-step>
        <el-step title="步骤2" description="签订入驻合同"></el-step>
        <el-step title="步骤3" description="公司申请入驻成功"></el-step>
      </el-steps>
    </div>
    <!-- 按钮区域 -->
    <div style="margin: 40px auto 0 auto; width: 80%; display: flex; justify-content: center; gap: 32px;">
      
      <el-button type="primary" size="large" @click="goToOtherInfo">继续完善公司经营信息</el-button>
    </div>
  </div>
</template>

<style>
</style>

<script>
import { useRouter, useRoute } from 'vue-router'  // 导入 useRoute

export default {
  setup() {
    const router = useRouter()
    const route = useRoute()  // 获取当前路由实例

    // 获取当前页面的 URL 参数（从 query 中提取）
    const { companyId, companyName } = route.query

    // 跳转租赁信息页面（携带参数）
    const goToRental = () => {
      router.push({ 
        name: 'enterpriserentalsubmission',
        query: { companyId, companyName }  // 传递参数
      })
    }

    // 跳转其他信息页面（携带参数）
    const goToOtherInfo = () => {
      router.push({ 
        name: 'modifydata',
        query: { companyId, companyName }  // 传递参数
      })
    }

    return {
      goToRental,
      goToOtherInfo
    }
  }
}
</script>